CREATE TABLE [dbo].[TDFINA_PAGO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_TIPO_FINA] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_FINA] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [int] NOT NULL CONSTRAINT [DF__TDFINA_PA__NU_SE__520F23F5] DEFAULT ((0)),
[NU_CNTA_BANC] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AA_BNCO] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MM_BNCO] [varchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TI_MOVI_BANC] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NU_COMP_BANC] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FE_OPER] [datetime] NULL,
[IM_MOVI_CARG] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_PA__IM_MO__5303482E] DEFAULT ((0)),
[IM_MOVI_PAGO] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_PA__IM_MO__53F76C67] DEFAULT ((0)),
[CO_USUA_CREA] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDFINA_PA__CO_US__54EB90A0] DEFAULT (suser_sname()),
[FE_USUA_CREA] [datetime] NULL CONSTRAINT [DF__TDFINA_PA__FE_US__55DFB4D9] DEFAULT (getdate()),
[CO_USUA_MODI] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDFINA_PA__CO_US__56D3D912] DEFAULT (suser_sname()),
[FE_USUA_MODI] [datetime] NULL CONSTRAINT [DF__TDFINA_PA__FE_US__57C7FD4B] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFINA_PAGO] ADD CONSTRAINT [PK__TDFINA_P__AD20C5C562FA842C] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_TIPO_FINA], [NU_COMP_FINA], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFINA_PAGO] ADD CONSTRAINT [FK__TDFINA_PAGO__4EDE7CE6] FOREIGN KEY ([CO_EMPR], [CO_TIPO_FINA], [CO_BANC], [NU_COMP_FINA]) REFERENCES [dbo].[TCFINA_BANC] ([CO_EMPR], [CO_TIPO_FINA], [CO_BANC], [NU_COMP_FINA])
GO
